/**
 * @Title:RoleFormController.java
 * @Package:com.xpjhs.role.web.controller
 * @Description:TODO
 * @author:luckyboyguo@126.com
 * @date:2015年1月16日{time}
 * @version:v1.0
 */
package com.xpjhs.role.web.controller;

import javax.servlet.http.HttpServletRequest;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;

import com.xpjhs.role.model.Role;
import com.xpjhs.role.service.RoleService;

/**
 * @ClassName:RoleFormController
 * @Description:{todo}
 * @author luckyboyguo@126.com
 * @date:2015年1月16日下午1:48:08
 */
@Controller
@RequestMapping("/role")
public class RoleFormController {

	@Autowired
	private RoleService roleService;
	@RequestMapping("/save")
	public String saveRole(HttpServletRequest request,ModelMap model){
		Role role =new Role();
		role.setRoleName("管理员");
		role.setTitle("管理员");
		roleService.saveRole(role);
		System.out.println("添加角色成功");
		return null;
	}
}
